package org.fly.jingwei.controller;

import org.pentaho.di.trans.steps.mergejoin.MergeJoinMeta;
import org.springframework.stereotype.Controller;
import org.springframework.util.LinkedCaseInsensitiveMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;
/**
 * @author leo.jie (weixiao.me@aliyun.com)
 * @version 1.0
 * @organization bigdata
 * @website https://www.jielongping.com
 * @date 2020/5/30 9:01 下午
 * @since 1.0
 */
@Controller
@RequestMapping(value="/mergejoin")
public class MergeJoinController {

    @RequestMapping(method=RequestMethod.POST, value="/types")
    protected @ResponseBody List types() throws Exception{
        ArrayList list = new ArrayList();
        for(int i=0;i<MergeJoinMeta.join_types.length;i++){
            LinkedCaseInsensitiveMap record = new LinkedCaseInsensitiveMap();
            record.put("name", MergeJoinMeta.join_types[i]);
            list.add(record);
        }
        return list;
    }


}
